<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html><head>
<!--Converted with LaTeX2HTML 98.1 release (February 19th, 1998)
originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->


<title>Binomial Showdown</title>
<meta name="description" content="Binomial Showdown">
<meta name="keywords" content="htmlatex">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="STYLESHEET" href="acm-00530_files/htmlatex.css">
</head><body bgcolor="#ffffff" lang="EN">

<h1><br clear="ALL"><center><table bgcolor="#0060f0"><tbody><tr><td><b><font color="#c0ffff" size="5">&nbsp;<a name="SECTION0001000000000000000000">
Binomial Showdown</a>&nbsp;</font></b></td></tr></tbody></table></center>
</h1>

<p>
In how many ways can you choose <i>k</i> elements out of <i>n</i> elements, not taking
order into account?

</p><p>
Write a program to compute this number.

</p><p>

</p><h2><font color="#0070e8"><a name="SECTION0001001000000000000000">
Input Specification</a>&nbsp;</font>
</h2>
The input file will contain one or more test cases.

<p>
Each test case consists of one line containing two integers <i>n</i> (<img src="acm-00530_files/530img1.gif" alt="$n \ge 1$" border="0" height="30" width="47" align="MIDDLE">)
and <i>k</i> (
<!-- MATH: $0 \le k \le n$ -->
<img src="acm-00530_files/530img2.gif" alt="$0 \le k \le n$" border="0" height="32" width="80" align="MIDDLE">).

</p><p>
Input is terminated by two zeroes for <i>n</i> and <i>k</i>.

</p><p>

</p><h2><font color="#0070e8"><a name="SECTION0001002000000000000000">
Output Specification</a>&nbsp;</font>
</h2>
For each test case, print one line containing the required number. This number will always fit into
an integer, i.e. it will be less than 2<sup>31</sup>.

<p>

</p><p>
<br>

<b>Warning:</b> Don't underestimate the problem. The result will fit into an integer - but if all
intermediate results arising during the computation will also fit into an integer depends on your
algorithm. The test cases will go to the limit.

</p><p>

</p><h2><font color="#0070e8"><a name="SECTION0001003000000000000000">
Sample Input</a>&nbsp;</font>
</h2>
<pre>4 2
10 5
49 6
0 0
</pre>

<p>

</p><h2><font color="#0070e8"><a name="SECTION0001004000000000000000">
Sample Output</a>&nbsp;</font>
</h2>
<pre>6
252
13983816
</pre>

<p>

</p><p>
</p></body></html>